'''
Created on 2017-6-23

@author: 24253
'''
import pymysql
def add_sql(name,result):
    try:
        conn=pymysql.connect(
                     host="127.0.0.1" ,
                     port=3306,
                     user="root" ,
                     passwd="zs910826",
                     db="python" ,
                     charset="utf8"
                      )
        cur=conn.cursor()
        if len(result)==0:
            return
          
        sql="insert into  Xiao (标题，页面地址，位置，数量，价格,店名) values "
        
        cur.execute(sql)
        conn.commit()
        cur.close()
        conn.close()
              
    except Exception :
        print("插入失败")
      